AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')

function ENT:Initialize()
	self.BaseClass.Initialize(self)
	self.Polonium = 0
	if not (WireAddon == nil) then
		self.WireDebugName = self.PrintName
		self.Outputs = Wire_CreateOutputs(self.Entity, { "Polonium Nitrate", "Max Polonium Nitrate" })
	end
end

function ENT:TriggerInput(iname, value)
end

function ENT:Think()
	self.BaseClass.Think(self)
	if not (WireAddon == nil) then
		self:UpdateWireOutput()
	end
	self.Entity:NextThink(CurTime() + 1)
	return true
end

function ENT:UpdateWireOutput()
	local Polonium = self:GetResourceAmount("Polonium Nitrate")
	local maxPolonium = self:GetNetworkCapacity("Polonium Nitrate")
	Wire_TriggerOutput(self.Entity, "Polonium Nitrate", Polonium)
	Wire_TriggerOutput(self.Entity, "Max Polonium Nitrate", maxPolonium)
end
